<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/11/19
  Time: 20:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ page isELIgnored="false" %>
<html>
<head>
    <title>薪酬标准管理添加</title>
    <link href="../../css/mine.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="/qimingxing/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript">
        $(function () {
            var error_name = true;
            $("#deptname").blur(function () {
                if (this.value == null || this.value.trim().length==0){
                    return ;
                }$.post("${pageContext.request.contextPath}/resource/demo1/deptnum","did="+this.value,function (data) {
                    if (data=="1"){
                        alert("部门编号已存在")
                        error_name = true;
                    }else {
                        error_name = false;
                    }
                })
            })
            $('#sumbit').click(function() {
                if(error_name==false)
                {
                    $('#formcheck').submit();
                }
                else
                {
                    return false;
                }
            });
        })
    </script>
</head>
<body>

    <div class="div_head">
                <span>
                    <span style="float:left">当前位置是：-系统管理》部门管理</span>
                    <span style="float:right;margin-right: 8px;font-weight: bold">
                    </span>
                </span>
    </div>
    <div></div>

    <div style="font-size: 13px;margin: 10px 5px">
        <form action="${pageContext.request.contextPath}/resource/demo1/add" method="post" id="formcheck">
            <table border="1" width="100%" class="table_a">
                <tr>
                    <td width="120px;">部门编码：<span style="color:red">*</span>：</td>
                    <td><input type="text" id="deptname" name="deptNum" value="1001" /></td>
                </tr>
                <tr>
                    <td>部门简称：<span style="color:red">*</span>：</td>
                    <td>
                        <input type="text" name="name" value="人事部" />
                    </td>
                </tr>

                <tr>
                    <td>部门全称：<span style="color:red">*</span>：</td>
                    <td>
                        <input type="text" name="fullName" value="人力资源管理部门" /></td>
                </tr>
                <tr>
                    <td>上级部门：<span style="color:red">*</span>：</td>
                    <td>
                        <input type="hidden" name="pId" value="${pid}">
                        <input type="text" readonly name="f_goods_image" value="${s}" />
                    </td>
                </tr>
                <tr>
                    <td>地址<span style="color:red">*</span>：</td>
                    <td>
                        <input type="text" name="address" value="XXXXXX" />
                    </td>
                </tr>


                <tr>
                    <td>简介：</td>
                    <td>

                        <textarea name="description"></textarea>
                    </td>
                </tr>

                <tr>
                    <td>备注：</td>
                    <td>

                        <textarea name="remark"></textarea>
                    </td>
                </tr>

                <tr>
                    <td>是否启用：</td>
                    <td>
                        <select name="state">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                </tr>

                <tr>
                    <td colspan="2" align="center">
                        <input type="submit" id="sumbit" value="添加">
                        <input type="submit" value="清空">
                    </td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>
